import jsonschema
json = {
    "desc": "标题",
    "login_data": {
      "mobile": "13800000002",
      "password": "123456"
    },
    "success": True,
    "code": 10000,
    "message": "xx操作成功!"
}
schema = {
    "type":"object",
    "properties":{
        "desc":{"type":"string"},
        "login_data":{
            "type":"object",
            "properties":{
                "mobile":{"const":"13800000002"},
                "password":{"const":"123456"}
            },"required":["mobile","password"]
        },
        "success":{"type":"boolean"},
        "code":{"type":"integer"},
        "message":{"pattern":"操作成功"}
    },"required":["login_data","success","code","message"]
}
jsonschema.validate(json,schema)